package com.sys.sprinngboot.goodtheater.service;

import com.sys.sprinngboot.goodtheater.bean.User;
import com.sys.sprinngboot.goodtheater.dao.UserMapper;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;

import javax.servlet.http.HttpSession;

@Service
public class UserService {
    @Autowired
    UserMapper userMapper;

    public User userByEmail(String email){
        return userMapper.getUserByEmail(email);
    }

    public void saveUser(User user){
        userMapper.saveUser(user);
    }

}
